home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 15 / CU Amiga Magazine's Super CD-ROM 15 (1997)(EMAP Images)(GB)[!][issue 1997-10].iso / TFX / install_tfx.bak < prev    next >
Text File  |  1997-08-19  |  9KB  |  441 lines

  1.  
  2. ; $VER: TfxInstall 1.2 (13.06.94);
  3. ; Script to install TFX Amiga
  4. ; Installer is Copyright 1991-1993 Commodore-Amiga, Inc.
  5. ;
  6. ; Sculpted, nay crafted, by Charlie & Steve
  7. ;
  8. ; (C)Digital Image Design 5-Oct-1994
  9.  
  10.  
  11. ; har har you've got to be joking..
  12.  
  13. ;amount of disk space reqd for tfx
  14. (set size_of_tfx 6000000)
  15.  
  16.  
  17.  
  18. (set #bad-kick
  19. (cat "You must be using Kickstart 3.0 to play TFX"
  20. ))
  21.  
  22.  
  23. (set #ask-disk1
  24. (cat "\n\nPlease insert the \"TFX DISK 0\" disk in any floppy drive."
  25. ))
  26. (set #ask-disk2
  27. (cat "\n\nPlease insert the \"TFX DISK 1\" disk in any floppy drive."
  28. ))
  29. (set #ask-disk3
  30. (cat "\n\nPlease insert the \"TFX DISK 2\" disk in any floppy drive."
  31. ))
  32. (set #ask-disk4
  33. (cat "\n\nPlease insert the \"TFX DISK 3\" disk in any floppy drive."
  34. ))
  35. (set #ask-disk5
  36. (cat "\n\nPlease insert the \"TFX DISK 4\" disk in any floppy drive."
  37. ))
  38. (set #ask-disk6
  39. (cat "\n\nPlease insert the \"TFX DISK 5\" disk in any floppy drive."
  40. ))
  41. (set #ask-disk7
  42. (cat "\n\nPlease insert the \"TFX DISK 6\" disk in any floppy drive."
  43. ))
  44.  
  45.  
  46.  
  47.  
  48. (set #select-type-help
  49. (cat "\n"
  50.      "Select Standard if you machine has no maths\n"
  51.      "coprocessor. Select 68881/2 if your machine\n"
  52.      "as a 68881 or 68882 FPU\n"
  53.         "**This option currently does nothing**\n"
  54. ))
  55.  
  56.  
  57. ;
  58. ; change this to guess the math type if possible
  59. ;
  60.  
  61. (set ask-fpu (askchoice
  62.     (prompt "Select type of math required"
  63.     (choices "Standard" "68881/2")
  64.     (default 0)
  65.     (help #select-type-help)
  66. )))
  67.  
  68. (procedure
  69.   select-destination-directory
  70.     (transcript "Selecting destination directory for the installation.")
  71.         (
  72.             (set dest-dir
  73.                 (askdir
  74.                     (prompt
  75.                         " Select destination directory for " pkgname " "
  76.                         "<drive>:Tfx is recommended.\n"
  77.                     )
  78.                     (help
  79.                         "specify the drive and directory you would like "
  80.                         pkgname " installing.\n"
  81.                     )
  82.                     (newpath)
  83.                     (default dest-dir)
  84.                 )
  85.             )
  86.         )
  87. )
  88.  
  89. (set
  90.     pkgname     "TFX Amiga"
  91. )
  92.  
  93. ; Requirements
  94. (set
  95.     need-version    37
  96.     need-memory     (* 1800 1024)
  97. )
  98.  
  99. (if (< (/ (getversion) 65536) 39)
  100. (
  101.     (abort #bad-kick)
  102. ))
  103.  
  104.     (complete 0)
  105.  
  106. ; set default destination
  107.  
  108.     (set dest-dir "sys:tfx")
  109.  
  110. ; ---------------
  111. ; clear disk params.
  112.  
  113.     (set askForDisk1 FALSE)
  114.     (set askForDisk2 FALSE)
  115.     (set askForDisk3 FALSE)
  116.     (set askForDisk4 FALSE)
  117.     (set askForDisk5 FALSE)
  118.     (set askForDisk6 FALSE)
  119.     (set askForDisk7 FALSE)
  120.  
  121. ; --------------------
  122. ; Display a little msg
  123.  
  124.     (message
  125.         "\n"
  126.         "\n"
  127.         "-= TFX AMIGA =-\n"
  128.         "\n"
  129.         "Hard disk installation v0.0\n"
  130.         "\n"
  131.         "TFX is ready to be installed\n"
  132.         "on your Hard Disk\n"
  133.         "\n"
  134.         "\n"
  135.         "\n"
  136.         "\n"
  137.         "\n"
  138.         "(C)opyright Digital Image Design 1994\n"
  139.     )
  140.  
  141. ; ask user for directory to install too
  142.  
  143.     (select-destination-directory)
  144.  
  145. ; 1% seems fair.
  146.  
  147.     (complete 1)
  148.  
  149. ; change to makedir dest-dir
  150.  
  151.     (makedir dest-dir)
  152.  
  153.     (complete 2)
  154.  
  155.     (set disk-space(getdiskspace dest-dir))
  156.  
  157.     (if (< disk-space size_of_tfx)
  158.         (abort
  159.             "Insufficient disk space in\n"
  160.             dest-dir "\n\n"
  161.             "TFX requires at least\n"
  162.             size_of_tfx " bytes of empty disk space\n"
  163.         )
  164.  
  165.     )
  166.  
  167. ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  168. ; Deal with boot-disk if required
  169.  
  170.  
  171. (set ask-boot (database "total-mem"))
  172. (if (< ask-boot 2048000)
  173.     (set ask-boot 1)
  174.     (set ask-boot 0)
  175. )
  176.  
  177. ;(set ask-boot 0)
  178.  
  179. ; force message to appear on all user levels
  180.  
  181. (if (= ask-boot 1)
  182. (
  183.     (set old-user (user 1))
  184.  
  185.     (message
  186.         "\nAs you only have 2Mb of memory, you\n"
  187.         "will require a boot-disk.\n\n"
  188.         "Please insert a blank disk in drive df0:"
  189.     )
  190.  
  191.     (user old-user)
  192. ))
  193.  
  194.  
  195. (if (= ask-boot 1)
  196. (
  197.     (working "\nFormatting boot disk\n")
  198.     (run "sys:system/format <>nil: drive df0: name TFX_BOOT noicons")
  199.     (run "c:install df0:")
  200.     (run "c:makedir df0:s")
  201.     (run "c:makedir df0:c")
  202.  
  203.     (copyfiles
  204.         (source "c:")
  205.         (dest "df0:c")
  206.         (choices "assign" "cd")
  207.     )
  208.  
  209.     (textfile
  210. ;       (help #mk-boot-help)
  211.         (dest "df0:s/startup-sequence")
  212.         (append "assign <>nil: did: " dest-dir "\n")
  213.         (append "cd <>nil: " dest-dir "\n")
  214.         (append "tfx <>nil:")
  215.     )
  216. ))
  217.  
  218.  
  219. ;---------------------------------------------------------------
  220. ; Create a script to call the config program
  221. ; so we can successfully override the current did: path settings
  222. ;---------------------------------------------------------------
  223.  
  224. ; set the pathname for the config script
  225.  
  226. (set initname
  227. (cat dest-dir
  228.         "/initcfg"
  229. ))
  230.  
  231. ;(message
  232. ;   "attempting to make\n"
  233. ;   "script on\n"
  234. ;   initname
  235. ;)
  236.  
  237. ; write the script
  238.  
  239. (textfile
  240.     (dest initname)
  241.     (append "assign did: dismount\n")
  242.     (append "assign did: " dest-dir "\n")
  243.     (append "cd  " dest-dir "\n")
  244.     (append "config")
  245. )
  246.  
  247.  
  248. ; actual copying stuff
  249.  
  250. ; Added for CUCD to copy from single directory
  251.  
  252.     (if (= askForDisk1 FALSE)
  253.         (copyfiles
  254.             (source "")
  255.             (dest dest-dir)
  256.             (files)
  257.             (pattern "~(disklist.cfg)")
  258.             (infos)
  259.         )
  260.     )
  261.  
  262. ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  263. ; Do disk 1
  264.  
  265.     (if (= askForDisk1 TRUE)
  266.     (
  267.         (askdisk 
  268.             (prompt #ask-disk1)
  269.             (help @askdisk-help)
  270.             (dest "did")
  271.         )
  272.  
  273. ; fpu related choices - commented out at present
  274.  
  275. ;   (if (<> ask-fpu 0)
  276. ;       (
  277. ;           (copyfiles 
  278. ;               (source "did:") 
  279. ;               (dest dest-dir) 
  280. ;               (files) 
  281. ;               (pattern "tfx")
  282. ;           )
  283. ;       )
  284. ;   )
  285.  
  286. ;   (if (<> ask-fpu 1)
  287. ;       (
  288. ;           (copyfiles 
  289. ;               (prompt "Hello")
  290. ;               (source "did:")
  291. ;               (dest dest-dir)
  292. ;               (files)
  293. ;               (pattern "tfx_fpu)"
  294. ;           )
  295. ;       )
  296. ;   )
  297.  
  298.         (copyfiles
  299.             (source "did:")
  300.             (dest dest-dir)
  301.             (files)
  302.             (pattern "~(disklist.cfg)")
  303.             (infos)
  304.         )
  305.  
  306.         (complete 20)
  307.     ))
  308.  
  309.  
  310. ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  311. ; Do disk 2
  312.  
  313.     (if (= askForDisk2 TRUE)
  314.     (
  315.         (askdisk (prompt #ask-disk2)
  316.              (help @askdisk-help)
  317.              (dest "didlib")
  318.         )
  319.  
  320.     (copyfiles (source "didlib:") (dest dest-dir) (files) (pattern "#?"))
  321.  
  322.     (complete 30)
  323.     ))
  324.  
  325. ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  326. ; Do disk 3
  327.  
  328.     (if (= askForDisk3 TRUE)
  329.     (
  330.         (askdisk (prompt #ask-disk3)
  331.              (help @askdisk-help)
  332.              (dest "didsea")
  333.         )
  334.  
  335.     (copyfiles (source "DIDSEA:")
  336.         (dest dest-dir)
  337.         (files)
  338.         (pattern "~(disklist.cfg)")
  339.         (infos)
  340.     )
  341.  
  342.     (complete 40)
  343.     ))
  344.  
  345. ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  346. ; Do disk 4
  347.  
  348.     (if (= askForDisk4 TRUE)
  349.     (
  350.         (askdisk (prompt #ask-disk4)
  351.              (help @askdisk-help)
  352.              (dest "DIDYUG")
  353.         )
  354.  
  355.     (copyfiles (source "DIDYUG:") (dest dest-dir) (files) (pattern "#?"))
  356.  
  357.     (complete 50)
  358.     ))
  359.  
  360. ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  361. ; Do disk 5
  362.  
  363.     (if (= askForDisk5 TRUE)
  364.     (
  365.         (askdisk (prompt #ask-disk5)
  366.              (help @askdisk-help)
  367.              (dest "PAR1")
  368.         )
  369.  
  370.     (copyfiles (source "PAR1:") (dest dest-dir) (files) (pattern "#?"))
  371.  
  372.     (complete 60)
  373.     ))
  374.  
  375. ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  376. ; Do disk 6
  377.  
  378.     (if (= askForDisk6 TRUE)
  379.     (
  380.         (askdisk (prompt #ask-disk6)
  381.              (help @askdisk-help)
  382.              (dest "PAR2")
  383.         )
  384.  
  385.     (copyfiles (source "PAR2:") (dest dest-dir) (files) (pattern "#?"))
  386.  
  387.     (complete 80)
  388.     ))
  389.  
  390. ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  391. ; Do disk 7
  392.  
  393.     (if (= askForDisk7 TRUE)
  394.     (
  395.         (askdisk (prompt #ask-disk7)
  396.              (help @askdisk-help)
  397.              (dest "PAR3")
  398.         )
  399.  
  400.     (copyfiles (source "PAR3:") (dest dest-dir) (files) (pattern "#?"))
  401.  
  402.     (complete 90)
  403.     ))
  404.  
  405. ; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  406. ; Amend startup-sequence
  407.  
  408.     (startup "AmigaTfx"
  409.         (prompt "Updating user-startup")
  410.         (help @startup-help)
  411.         (command "assign did: " dest-dir)
  412.     )
  413.  
  414.  
  415.  
  416.     (complete 100)
  417.  
  418.     (message
  419.         "\n"
  420.         "-= TFX AMIGA =-\n"
  421.         "\n"
  422.         "TFX is now installed on your Hard Disk\n"
  423.         "and is ready to play, if you are using\n"
  424.         "a 2MB machine then you must free up as\n"
  425.         "much memory as possible, by switching\n"
  426.         "off external drives and unused Hard\n"
  427.         "disk partitions as possible, also make\n"
  428.         "sure that you keep the number of buffers\n"
  429.         "allocated by HdToolBox to a minimum.\n"
  430.         "\n"
  431.         "\n"
  432.         "(C)opyright Digital Image Design 1994\n"
  433.     )
  434.  
  435.  
  436. ; Run the TFX Config program and exit
  437.  
  438.     (execute initname)
  439.     
  440.  
  441.